#include <iostream>
#include <array>
#include <string>
#include <fstream>
#include <sstream>

using namespace std;

void ReadIntFile( string filename, array<int,1000100> *salaries );

int main( void )
{
	array<int,1000100> *salaries = new array<int,1000100>();


	ReadIntFile( "salary.txt", salaries );


	cout << salaries->empty() << endl;
	cout << salaries->size() << endl;
	cout << salaries->max_size() << endl;
	


	

	cin.get();
	return 0;
}

void ReadIntFile( string filename, array<int,1000100> *salaries )
{
	string strRow;
	ifstream fin;
	int position = 0;
	int tempInt;
	try
	{
		fin.open( filename );
		cout << "Opening and reading file" << endl;
		while( getline( fin, strRow ) )
		{
			istringstream iss( strRow );

			iss >> tempInt;
			(*salaries)[position] = tempInt;
			position++;

		}
			
	}
	catch( exception e )
	{
		cerr << "Exception " << filename << endl;
        cerr << e.what() << endl;
	}

}